if (self.CavalryLogger) { CavalryLogger.start_js(["LGjEK"]); } __d("SearchBootstrapEntityModuleDebugUtil",["Arbiter","BanzaiODS","JSLogger","gkx"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g={backend_faster_no_matches:"BEM not shown because backend returned faster but had no matches anyway",backend_faster_with_matches:"BEM had matches but backend was faster",no_matches:"BEM not shown as no matches were found",shown:"BEM shown"};a={printDebugNotice:function(a,c,d,e){e=e!=null&&e.length>0;e=e?"has_preloaded_entity_ids":"without_preloaded_entity_ids";b("BanzaiODS").bumpEntityKey(2966,"search.www."+a,c+"."+e);b("Arbiter").subscribe(b("JSLogger").DUMP_EVENT,function(a,b){b.searchBootstrapEntityModule={notice:g[c],matches:JSON.stringify(d!=null?d:[])}});b("gkx")("678798")}};e.exports=a}),null); __d("SearchBootstrapEntityModuleUtil",["cx","fbt","DOM","FacebarJSConstants","SearchBootstrapEntityModuleUIConfig","SearchEntityModuleServerConstants","URI","immutable","md5","randomInt"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("immutable").Map(),j=new RegExp("^/(search/top|search/str.+/keywords_(top|search))"),k=new RegExp("^/(search|topic/trending)"),l=new RegExp("^/search/str/([^/]+)/");function a(a){__p&&__p();var b;switch(a){case"user":b=h._("People");break;case"page":b=h._("Pages");break;case"group":b=h._("Groups");break;case"app":b=h._("Apps");break;case"place":b=h._("Places");break;case"event":b=h._("Events");break}return b}function m(a){__p&&__p();if(a.subtext==null)return[];if(a.browse_type==="browse_type_tv_show")return[b("DOM").create("span",{},[b("DOM").create("span",{className:"_2vo8"},h._("SHOW")),a.subtext])];a=a.subtext.split(/\s*\u00B7s*/g).map(function(a){return b("DOM").create("span",{},a)});var c=a.pop();a=a.slice(0,b("SearchBootstrapEntityModuleUIConfig").numSnippetsToShow-1);c!=null&&a.push(c);return a}function c(a,c){a=a.filter(function(a){return a.type!==b("FacebarJSConstants").keywordType}).sort(function(a,b){return a.bootstrapCost-b.bootstrapCost});var d=a[0],e;d!=null&&(e=d.type);a=a.filter(function(a){return a.type===e}).slice(0,b("SearchBootstrapEntityModuleUIConfig").numBootstrapResultsToShow);return a.map(function(a){return n(a,c)})}function n(a,c){var d=a.tuid,e=a.path,f=a.text,g=a.photo,h=a.photos,i=a.is_inactive,j=a.is_verified,k=a.hcm_match_criteria,l=a.show_hcm_experience,n=o(a);return{tuid:d,uri:new(b("URI"))(e).addQueryData("ref",b("SearchEntityModuleServerConstants").BROWSE_RESULTS_PAGE_REF),type:n,text:f,photo:g,photos:h,snippets:m(a),module_role:b("SearchEntityModuleServerConstants").RESULT_TYPE_TO_MODULE_ROLE[n],is_bootstrap:!0,is_inactive:(d=i)!=null?d:!1,is_verified:j,logging_unit_id:p(c,a),is_currently_live:!1,is_gaming_page:!1,hcm_match_criteria:k,show_hcm_experience:l}}function o(a){var b;a.render_type==="place"?b="place":b=a.type;return b}function d(a,c){return new(b("URI"))(b("SearchEntityModuleServerConstants").TYPE_TO_SERP_PATH[o(a[0])]).addQueryData({q:c})}function p(a,c){var d=i.get(a);d==null&&(d=b("immutable").Map(),i.set(a,d));a=d.get(c.tuid);a==null&&(a=q("www_bem_res"),d.set(c.tuid,a));return a}function q(a){return a+":"+b("md5")(String(b("randomInt")(0,Number.MAX_SAFE_INTEGER)))}function r(a){return a.getPath().match(k)!=null}function f(a){var b=a.getQueryData();return b.filters!=null?!1:a.getPath().match(j)!=null}function g(a){if(!r(a))return null;var b=a.getQueryData();if(b.q!=null)return b.q;b=a.getPath();a=b.match(l);return a!=null?decodeURIComponent(a[1]).replace(/\+/g," "):null}e.exports={getTitleForResultType:a,getSnippetForRawBootstrapResult:m,transformRawBootstrapResultsToEntityModuleResults:c,getSeeMoreURIForResults:d,generateUnitIDWithPrefix:q,getQueryFromURI:g,isSERPURI:r,isTopTabURI:f}}),null); __d("SearchEntityResult.react",["cx","LineClamp.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=2,i=2,j=2,k=2,l=1,m=20,n=18;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.$1=function(){return this.props.snippets[0]==null?null:b("React").createElement(b("LineClamp.react"),{fitHeightToShorterText:!0,lines:i,className:"_6v_1",lineHeight:n},this.props.snippets[0])};d.$2=function(){return this.props.snippets[1]==null&&this.props.snippets[2]==null?null:b("React").createElement("div",{className:"_73ko"},b("React").createElement(b("LineClamp.react"),{fitHeightToShorterText:!0,lines:j,lineHeight:n},this.props.snippets[1]),b("React").createElement(b("LineClamp.react"),{fitHeightToShorterText:!0,lines:k,lineHeight:n},this.props.snippets[2]))};d.$3=function(){return this.props.snippets[3]==null?null:b("React").createElement("div",{className:"_6v_d"},b("React").createElement(b("LineClamp.react"),{fitHeightToShorterText:!0,lines:l,lineHeight:n},this.props.snippets[3]))};d.render=function(){return b("React").createElement("div",{className:"_77we"},this.props.image,b("React").createElement("div",{className:"_6v_9"},b("React").createElement("div",{className:"_6v_a"},b("React").createElement("div",{className:"_6v-_"},b("React").createElement(b("LineClamp.react"),{fitHeightToShorterText:!0,className:"_6v_0",lines:h,lineHeight:m},this.props.title),this.$1()),this.props.actions!=null?b("React").createElement("div",{className:"_6v_2"},this.props.actions):null),b("React").createElement("div",{className:"_6v_b"},this.$2(),this.$3())))};return c}(b("React").Component);e.exports=a}),null); __d("SearchProfileResultConstants",[],(function(a,b,c,d,e,f){"use strict";e.exports={PROFILE_PICTURE_SIZE:72}}),null); __d("SearchSnippetsHighlighter",["csx","NodeHighlighter","concatMap","mayHaveConnectedCharacters"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=babelHelpers["extends"]({},b("NodeHighlighter"),{getHighlightCandidates:function(){return["._glo","._glm","._l1a"]},highlight:function(a,c){__p&&__p();var d=this;if(c.some(b("mayHaveConnectedCharacters")))return;var e=b("concatMap")(function(c){return b("concatMap")(d.getTextNodes.bind(d),d.searchNodes(a,c))},this.getHighlightCandidates());for(var e=e,f=Array.isArray(e),g=0,e=f?e:e[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var i;if(f){if(g>=e.length)break;i=e[g++]}else{g=e.next();if(g.done)break;i=g.value}i=i;if(i.parentNode==null)return}b("NodeHighlighter").highlight.call(h,a,c)}});e.exports=h}),null); __d("XSearchBrowseActionsController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/search/async/browse_actions/",{id:{type:"String",required:!0},result_type:{type:"String",required:!0},session_id:{type:"String",required:!0},query:{type:"String",required:!0},logging_unit_id:{type:"String",required:!0},actions_id:{type:"String"}})}),null); __d("SearchProfileResult.react",["cx","fbt","AsyncRequest","Badge.react","CurrentUser","DOM","DOMContainer.react","Image.react","Link.react","PageRatingConfig","PageRecommendationsCircleScore.react","PageRecommendationsCircleScoreType","React","SearchEntityModuleServerConstants","SearchEntityResult.react","SearchProfileResultConstants","SearchResultPageExperiments","SearchSnippetsHighlighter","TrackingNodes","WorkFeatureAvailability","XSearchBrowseActionsController","XUIButton.react","XUISpinner.react","memoize","uniqueID"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("PageRecommendationsCircleScoreType").SEARCH_RESULT_LARGE;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;gthis.props.num_results_to_show?" hidden_elem":""),key:"see_all_footer"},b("React").createElement(b("Link.react"),babelHelpers["extends"]({},this.getSeeMoreLoggingData("footer"),{href:b("SearchEntityModuleUtils").addExtraParamsToSeeMoreURI(c,this.props.typeahead_session_id,"footer")}),i._("See All")));a.push(c)}return a};d.componentWillUnmount=function(){this.$1.release()};return c}(b("React").Component);e.exports=a}),null); __d("SearchHCMMatchUtil",["FBLogger","SearchHCMServerConstants","TokenizeUtil"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g={};Object.keys(b("SearchHCMServerConstants").MATCH_CRITERIA_TO_STRING).forEach(function(a){a=Number(a);a=a;g[b("SearchHCMServerConstants").MATCH_CRITERIA_TO_STRING[a]]=a});function h(a){return b("TokenizeUtil").parse(a).tokens.join("")}function a(a,c,d){__p&&__p();c=c.toLowerCase().trim();d=d.toLowerCase().trim();a=typeof a==="string"?g[a]:a;switch(a){case 0:return c===d;case 1:return d.indexOf(c)!==-1;case 3:return d.indexOf(c)===0;case 4:return!0;case 5:return h(c)===h(d);default:b("FBLogger")("search").warn("Unexpected HCM match criteria %s",a);return c===d}}e.exports={match:a}}),null); __d("SearchHCMUtil",["invariant","SearchEntityModuleServerConstants","SearchHCMMatchUtil"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h={shouldTriggerBEMHCM:function(a,c){if(!c.bemHCMEnabled)return!1;var d=c.hcm_match_criteria;if(d==null&&c.type==="user"&&b("SearchHCMMatchUtil").match(0,a,c.text))return!0;return c.show_hcm_experience!==!0?!1:d!=null&&b("SearchHCMMatchUtil").match(d,a,c.text)},getHighConfidenceArgument:function(a,c){if(!h.shouldTriggerBEMHCM(a,c))return null;c!=null||g(0,1463);return{id:c.id,module_role:b("SearchEntityModuleServerConstants").RESULT_TYPE_TO_MODULE_ROLE[c.type],source:null}}};e.exports=h}),null); __d("XSearchBEMUnitDataLoggingController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/search/async/log_bem_unit_data/",{session_id:{type:"String",required:!0},logging_unit_id:{type:"String",required:!0},query:{type:"String",required:!0},query_function:{type:"String",required:!0},results_module_role:{type:"String",required:!0},tapped_result_entity_id:{type:"String"},entity_ids:{type:"StringSet"},bootstrap_item_count:{type:"Int"},should_log_module_impression:{type:"Bool",defaultValue:!1},is_high_confidence_module:{type:"Bool",defaultValue:!1}})}),null); __d("XSearchProfilePictureController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/search/async/profile_picture/",{fbid:{type:"FBID",required:!0},width:{type:"Int",required:!0},height:{type:"Int",required:!0}})}),null); __d("generateBrowseSessionID",["CurrentUser","md5"],(function(a,b,c,d,e,f){var g={mtouch:"412378670482",www:"256281040558"};function a(a){var c=a.appName;a=a.edge;return b("md5")([g[c],b("CurrentUser").getID(),a,Math.floor(Date.now()/30)].join(":"))}e.exports=a}),null); __d("SearchInstantBootstrapEntityModule",["cx","fbt","Arbiter","AsyncRequest","BanzaiODS","Base64","BlueBar","BrowseClickLogger","ContextualComponent","CSS","CurrentUser","DOM","FacebarKeywordSearchUtils","PageTransitionsRegistrar","Quickling","QuicklingConfig","React","ReactDOM","ReactRenderer","Run","SearchBootstrapEntityModuleDebugUtil","SearchBootstrapEntityModuleUIConfig","SearchBootstrapEntityModuleUtil","SearchEntityModule.react","SearchEntityModuleServerConstants","SearchHCMUtil","SearchHighConfUserAttachmentsExperiment","SearchProfileResultConstants","SearchResultPageNavigationPerfMetrics","SearchWWWTrackableClientViewConfig","SubscriptionsHandler","URI","ViewableImpressionTracking","XSearchBEMUnitDataLoggingController","XSearchProfilePictureController","XUIPageNavigation.react","XUIPageNavigationGroup.react","XUIPageNavigationItem.react","XUISpinner.react","ge","generateBrowseSessionID"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=[h._("All"),h._("Posts"),h._("People"),h._("Photos"),h._("Videos"),h._("Pages"),h._("Places"),h._("Groups"),h._("Apps"),h._("Events")],j=[h._("All"),h._("Posts"),h._("People"),h._("Groups"),h._("Events"),h._("Photos")],k,l={};a=function(){__p&&__p();function a(a){__p&&__p();var c=this;this.$11=[];this.$12=!1;this.$13=!1;this.$14=!1;this.$19=function(a){__p&&__p();c.$12=!1;if(!b("SearchBootstrapEntityModuleUtil").isTopTabURI(a))return;c.$14=!0;var d,e=b("FacebarKeywordSearchUtils").decodeFacebarURIParams(a);e!=null&&(c.$8=e.sid,d=e.bsid);d==null&&(d=b("generateBrowseSessionID")({appName:"www",edge:"keywords_search"}));c.$9=d;c.$4=b("SearchBootstrapEntityModuleUtil").getQueryFromURI(a);c.$20();c.$21(a);c.$14&&c.$11.length>0&&(c.$22(),c.$23());c.$24()};this.$27=function(a){if(c.$9==null)return;c.$11=b("SearchBootstrapEntityModuleUtil").transformRawBootstrapResultsToEntityModuleResults(a,c.$9)};this.$1=a.getCore();this.$2=new(b("SubscriptionsHandler"))();k=this}var c=a.prototype;c.enable=function(){__p&&__p();var a=this;this.$7=b("ge")("content");if(this.$7==null)return;b("Run").onAfterLoad(function(){__p&&__p();a.$15();a.$2.addSubscriptions(b("Arbiter").subscribe("page_transition",function(){if(!a.$16())return;a.$17();a.$18()}));if(!a.$16())return;a.$17();a.$18()})};c.$16=function(){return b("Quickling").isActive()&&b("Quickling").getLoadCount()=d.length)break;g=d[f++]}else{f=d.next();if(f.done)break;g=f.value}g=g;c=b("XSearchBEMUnitDataLoggingController").getURIBuilder().setString("logging_unit_id",g.logging_unit_id).setString("session_id",a.browse_session_id).setString("query",a.plain_text_query).setString("query_function",a.browse_query).setString("results_module_role",a.module_role).setString("tapped_result_entity_id",g.tuid).setBool("is_high_confidence_module",a.is_high_confidence_module);new(b("AsyncRequest"))(c.getURI()).setAllowCrossPageTransition(!0).send()}};c.getPossibleHCMResult=function(a){var c=a[0];return a.length!==1||c==null?null:{id:c.tuid,text:c.text,type:c.type,bemHCMEnabled:b("SearchHighConfUserAttachmentsExperiment").bemHCMEnabled,show_hcm_experience:c.show_hcm_experience,hcm_match_criteria:c.hcm_match_criteria}};return a}();e.exports=a}),null);